added js problem 22