polling function for host (not finished & untested)