thomas algorithm ... nr 2