fixed bug in hw5