replaces put with patch