refactoring done for now