Implemented matrix sum