implemented tag and untag (complete with their undo counterparts)