small code refactoring.