testing onLeave