Added and solved problem 8
Added comments for clarification