modded some code to handle the ssvs multimodal simulation