an old version of kjs with a  main test function