outsourced setting variables and so on