after code refactoring