Added histexp() function to export history