add functionality to set exit point.