more generalizations to optimization