change in time function