singleton made. new problem: exit is not working