Working and formatted for style, submitted for class assignment.