added support for format=detailed and more tests