added date sorting