Added filter for distance