add functionality to extract keys