homework 5 program4 fix