function undo_move added, function make_move improved