add class to hide redundant elements