finished coding asg 4