slight generalizations