implemented orientation control