WG: how to change resource name programmatically