adding matrix