refactoring edit_project