this looks like a function but it's all inline.