modifications to fix errors in p/g/a