switched inverse to pseudoinverse in nlac functions.