optimize several parameters