made sure to declare temp var

made sure to declare temp var