algorithm is complete