Some debug output; implementation of NNH algorithm seems to work