Added an exit method