added declarations for exit statements