This seems to be a recurring pattern. I wonder if there is a way we could DRY it up.