Small change: additional boolean variable removed