Chapter4: some fixes in solution 4-6