coding style refactoring