solved problem 16 with javascript