removed couts and cleanup for prg