Adapt example1.c