made it impossible to enter undefined matrices. Having some weird issues with malloc though.