Added mask option to group
Simplified SAMP operation