A study of jet mass distributions with grooming