Revised format and added tests.