added neat javadoc to pgm2