Sort by type function

With check boxes and enum