Possibly Final version of Prog2