update example code and README