sort classes into correct packages