implemented method to find a key