Completed exercise4