added exists() method for collections