ex1 compiling
modified ex1