hash code improvements