returns a formated hours array to the DOM, TODO refactor out all the variables from the controller