sorting by timestamps done