demote "container" to a local variable.