Add the client loop to reduce unneccesary amount of network traffic.