added another version of solveLinar (I will determine which to use after some benches and tests)