added query and insert method for content provider