adds device orientation detection