restructured processState and Inputs