added compact format, documentation, test