add multi threaded server support