added insertwithquery