refactor time of last message