1st version of (roughly) working cosimulation