add format option supporting xml and json