code compiles and works on test case psims.params