finish a part of algorithm