Recovery implemented, but needs to be debugged probably