use regenerator, detect generator support