updated to support newer download scheme