added support for acceptable distance to goal node