further condensing of martin's patch: