Added SA and SA_reverse to be saved in the file - for debug.
added 2-way search.