refactored for collaborating with highlight.js