prig assignment 2

completed code