some style refactoring