helper functions in editpage