add setting to control history size