Made modification to ex3.c