add index to readme and minor code sample update