post method to add history