added DRY'ing code example