added main function for stdin tester program