Added variable calculation for Type O on line 25.