Understanding the NST algorithm