prototype query working