Working for ^NDX
Adding some tests