Improving interface
Merge pull request #3 from joshualande/betteralgorithm

Improving interface