separating and improving code for highlighting
using new highlighting code