fixed computeANN, but has to have certain orientation going in...