Made a working solution to the SystemFunctional class coding question for pset 3