hashkey code bug corrected
additional tests