013 solution in js