Added test functions in main.c