change Q2 to make sense on the current version of R; original problem produce inf for all cases on the current R system