Add signature mask logic