implement 'prev'