created prototype query