improved DRY