YJ- FYI: alg now again does repeat the previous move