error full while loops are eliminated