Adding feature to initialize a collection from api response