doc examples refactor part1