set maxHistory