flowed changes to key recover func