DRY and logging