Sync of test code (main.c)