since this occurs twice, maybe it would be useful to factor it out to a function so you can give a name to it.