move download to api