format refactor