refactoring coding style