server w/while loop