removing unused lstsq and fixing output of tset