udpate moh class processing on js to replace php