Added generator support