some progress towards debugging.. calcClosest is currently returning NaN for all searches however..