finished! algorithm complete