Added generator method