Improvement in hw2