format refactoring