algorithm of data insertion approved