before date refactoring