add code example in doc