functionality for finding nodes within range
fixed some errors in routes test