changed dupe func to mysql, added success statement