Implemented basic matrix module