mass refactor