don't pass the loop through all function calls
add retries in case of connection failures
add reachability