how to add numbers on a matrix table