dynamic masking implemented; extra-extra credit version complete