more uniform highlighting code