changed p, q, g to larger numbers. fixed few typos in comments