aside: it seems like we should should be able to come up with a better name for this function.