wonder if it will be a problem that this all happens in the UI thread. if so can just offload to celery.