replace resource