eliminate some local variables