edit feature, refactoring