edit to make obi work with mask