This could be extended instead, but we'll leave that for optimization.