changed execute_get_wid logic