refactoring some code