implement --hash-by-class