code snippet re-format