added hashcode function