add support for mask