tweaked main class a bit