Mofidy the retrieving key function