error in program - not accounting for parent orientation in update