Fixed bug in matrix multiply algorithm, implemented design