v0.3: add the sort alogrithm