sorting out pkgs