different kinds of sorting code