added some JavaScript