finished sort by date and made a non-trivial test case