adds delHistory function to delete a range from history