collect related variables into struct