further improved fingerprint, implemented hash function