using indexseq instead of set to optimize sum
removes pause from env, it is only needed by gui
fixes LightSensor