working on refactor to support packages