integrate threads
integrate threads with shell