fixed names + nn calculation