getmaxlength + misc fund to new js