updated the code example