Wonder if we can do this with less code duplication.