Added distance option for filter