added orientation management