added highlight and unhighlight to error elements