Exercise #3 implemented.