use threading module rather than thread (deprecated)