works except for json
Fixed all known bugs