added threading infrastructure and result objects