mask_payload function clause added