combining event handler fn
fixing panel highlight error, due to wrong add/remove class
implementing hasFormat fn to replace specific fns