added a method and added methods for switching and stoping threads (will be needed regardless of using the screen switching)