Neural mechanism to represent the recent past