refactoring formatter