start adding multi threading framework