unclean some code and add info about selecting a hash function