try to move variable from while