add extra argument for mask