Switched to local variables