support for multiple exits