Add patches functions