fixed variable typos, confusion