cleaned up thread spawning interface