x and y changed to rows and cols