handling zero matrix