readme and example code updated