also check if the key exists