while is working for simple tests