Working Problem 1 implemented.