the beginnings of user-defined sorting