corrected error and timeing