toggling between showing and editing state