Matrix equation solver modified