renamed variables for clarity