Implemented hash code.