added rehash factor function