make example wait for 'features-loaded' and 'ready' events instead of 'ready' and 'connected'