done most query operation. need test