some improvements on json queries