WIP: setting min and max node-distance
Function for setting min and max node-distance