Algorithm implementation.
Merge pull request #1 from athlan/master

Algorithm implementation.