renamed variables correctly