ready to add history record function