replace for with while; upgrade 0.0.9