implemented bool query to json