quick rewrite now that it's not horrible-in-the-morning.