Completed exercise3