First protoype for qury