Adjust Java script