Made the switch happen once every 5 seconds. Added the ability to have unlimited number of threads.