removing unused local variables