updated sgscript, unknown bug left to fix