added json export, too slow
Fixed export