timestamp sorting improved