update to key retrieval