adding cleanup of keys