edits refactoring (again!)