moved this example to C too