working code for final ss ddm sims
minor refactoring
minor refactoring
removed previous merges