optimized the BiCGSTAB, added 2D