read events from database