renamed some variables to reflect change in class