added main class and tests