bugfix
better json api, better decoding
merge