edit main script to fix per hour tracking