changed the way we check for collections