updated version for 8 different orientations and one invalid state