added some history functionality