converted mask_computation to new plotting API