It might be nice to break this into a multimethod, but I don't care too much.