added saving of head pose