add test and code for problem 11