Remove a meaningless parameter
Add a mini formatting function.
Add a test case for format() method.
Modify the code for readability