support num_of_history option