refactoring of edit app