code refactoring.
add to the format option.