update logic for gysdl and cgsdl