adding patching logic on server side