Updated chapter_one solution and added test cases