I think this branch should live in a separate function.