Avoided code duplication.