add has_key? method.