eliminate tmp variable