changed variable names for clarity