improve highlight funcion, record the data to DB