edited variable names for clarity and readability