merged four for-clauses to one in smart tau selection