finished writing method to insert into temp table