add exit method to applet