improve names and code readability also use Time class instead of DateTime class