updated the addHours function to write to the hoursLog table.