yah the condition should be as before `i * i < n`