realized I was doing conditional logic where the variables weren't defined