refactored ch5 with class and added test