Simplified code for data insertion