update examples/simple.c following the changes to the API