modified main class to use new class