matrix bombing and a fix for sum numbers in matrix