Pleasing code climate, abstracting duplicated code