finished Prog Assignment 2