adding new board algorithm