renamed variables to be more accurate with their function