Added loop to client server