refactored to allow future packages