update example and read me for new API