Resorting into different packages