revised variable names for clarity