refactoring fix