Added functions patch and getRow