add patch function in veil.resource