added main.c for testing