added history querying for events