refactoring again