demo while for accept