adding handler for json results