Change the format slightly to make it more convenient, add unit test.