swaping resource definitions