newer version of maskDesign.py