more DRY and less redundancy