add mask support