Partial work. Tests pass.