refactor out insertInto