refactored doc code blocks for simil usage