solved 2.1.1
added test case for 2.1.2
solution 2.1.2