added max complexity setting support