Avoid code duplication.