rewrote the thread creation

Should be easier to start thread and make checks if some thread are
running before starting another