refactoring style and indentation