Don't overwrite "type", use "restricted_type" as a var name instead