better thread management, performance improvements