updating ot allow querying by keys. using keys as ids since they are unique and there