ENH getting rid of unnecessary local variable