tried fixing the timediff problem