added new functions to enable the cosimulaiton