problem 3, solved. slow to run, however
Merge pull request #2 from bbyler/master

problem 3, solved. slow to run, however