sorting by different types