refactored showhours.js