added testcode main.c