changed connection hash function