added code to solve JtJ for smallest singular value (using EPS instead of SVD)