Add main and Server thread