Refactoring needed