limit the # of trials. apparently a python memory error?