Adding changes to ex18.c