added unit test for format