Rewrote QueryInsert with use of lodash