modified template to complete prog assn 2