additional edits in func_sgwi