teacher sorting