a little bit more comprehensive C example