Should use while instead