Added distance option.