complete the program ex1