change to asynctask. need to test