seemingly working version of NIPALS sparse