add tests for isBefore