renamed vars for clarity