replacing insert ip in database function
replacing insertion new source function