refactor for packagelist