Sharath: Modified code for solve matrix code change