throw error if exceeds opts.maxLoop, fixes #3
reproduction before selection
update API