fixed refactoring issue