fixing hour calculation, adding enterprise logging