refactor code format