almost finish recovery, writing tests