added switch to hide elements in non-edit mode