refactored models and inputs