sorts display and teacher out of data