changed variable names to more descriptive and commented