writes new padMatrix according to specifications