sorting blocks by type