added example for an event loop + histogram