merge the algorithm's main function into one
widen tests to be more explanatives
update README.md