Used transpose and slice methods to create columnsand rows