switched to local variable