added main class and simple input parsing