Updated to check time