added sorting by datetime; fixes #5