refactoring for fix