sort blocks