programming assignment#2 -try 2