better alg for board extension