revised test.py -KL