added key search and output