Also a good candidate for a base class/mixin since the `if` if the same, but it might be harder to refactor, so not a requirement for now, just something to keep in mind for next time.