set variables correctly