renamed variables to better document program.