renamed variables for easier understanding