Avoid copying the same code twice.