this is a pattern i see more and more. we should maybe (?) standardize on a way to do this generically.