Applying the DRY principle