created initHoursGrid() function.