added method that insert data to elasticsearch