much more DRY code