had to fix some of the variables