added function to insert data to sqlite