removed duplicate sql inserts