Exercise #2 implemented.