with while(1) loop app