reduce number of var statements

micro optimization