implemented my own version of LLS using svd