added database parameter
uncomment getting all events