added server listen loop