avoid closure var when it can be avoided