Add some changes to make the solution more accurate
Fix bugs in exercise 5 (day7)