for GCP-5620, made changes so that list entries are retrieved by 5000 a batch from the database so that large lists can be handled