Added patch functionality