stewart gough code added for testing and included fixes to the simulation node