added orientation, tap and shake detect