Completed exercise6