solved prac2 problem1.11