finished addTime Function