make main class singleton