Added problem 3. Uses a large number of Googled functions. Should come back to this later.