added leaptime function