extend exit functionality