code example updated