finished implementing the recovery procedure