many changes in tpl engine, optimize perfomance