some basic outline code
wrote the basic algorithm
Merge pull request #1 from Rarlegend/master

4/19/14 - basic algorithm