amended variable names to reflect typos