reorganized into package with mask, analytics added