sort lectures by key