add exit method to all applets