added method to insert data