better tracking and multithreading