[formatter]  code refactor