refactored exit to trust