Adjusts algorithm again
Merge pull request #115 from vishalkal/temp

Adjusts algorithm again