updated assignment 2 to cover thread - not working yet