updating masks