assignment 2 - problem 9 is wayyyy more efficient now.
updates for assignment2