implement hash-base selection