moved listen(1) outside of while loop in server