add time change function