Problem 8 solved.
Tests for problem 8 added