Use API instead of doing the math.