added face-up/down detection