moved mode parameters to proper location