add auto resizing mask