Updated code to implementICollection