adds leave trigger