Changes to code for the correct variables