minor js code.