renamed variables to avoid confusion.