typos in definition for Q. Still having issue with overflow...