working version updated for Deep Thought