end tag to prev