Converted everything to Matrices