api defined for patching