implemented pagination in history Page