toggle between edit and view now works