refactored edit image page