semi working client, no longer segfaults, still need run_tasks