implement some basic sort algorithms