fliplr and flipud for the matrix