Adding support for sequence/function masks