update readme and fix a code example