implement isAfter and isBefore
add tests for isAfter