adding random_from_mask