Added GetHistory function