added keys function in case of missing