modified recover.c