finish item item algorithm