Started and completed both programs for homework 5