extracting variables to parents