add has and removeKey function