changed variable names and comments