added events and histories tables