improved data insertion