separate data into thread internal and external context