define isEditMode in scope