recovery logic updated