Problem #8: minor improvements