refactored syntax highlighting