added input context addition and initial conditions