improved json responses (#2)