added basic history functionality