To avoid someone else from rewriting this yet one more time, please explain what 'p' and 'g' are!