added orientation support for cells