rprog004-pa2 code working, documentation in progress