changed sql statement to update and not insert/on dupe update