rotating the table properly