added generator and cogenerator