recover added. some other minor changes