add missing cases, variable resolution to unique name