Homework9 (little upgrade)