init main class code