started moving modulator code outside of pspawner