generalized the naming scheme so that it falls back on the name of the optimizer class