replacing put with patch