add ancestor mask test