added method for saving list of entities