Microscopic calculation of friction in heavy ion reaction using linear response theory