add logic for fetching the collections