add a padded matrix

put the in matrix in to a pad, with all 0 around to avoid if statement
in the main loop