refactored model packaging