need to fix the code to use correct variable names