updated version with PATCH support