changed variable names to match notes