moved datetime processing up and count rounding (which is OK) down