few bugs in hw3_prob4