Add sorting by type