query insert update remove function finished