fix hour calculation
use floats for hours