First algorithm complete