I am trying to set a distance variable inside a collection and again filtering the collection with collection where using the distance as reference. But after the collection is