turns out python doesn't like it when you reference variables that don't exist