Added code to parse keys