modified to take params and IC from InputGUI