wrapped curl calls to allow for repeated attempts