handle the edge case after 1 iteration