set up structure for end of search
Saving works superficially