while replaced by for