Add more test cases.
Add answer for 4.7.
Add answer for 4.8.