set orientation and rows