Add hash and hasHash methods