modified ex1-16.c