Assignment 9-3 for class. It doesn't work completely yet.