modify the testEdit function