added sql event storage