an example written by others in C.