rowbyrow and colbycol operations