add mask and msg to each step