I remember this from somewhere else, and if so, I think it deserves som DRY treatment