renamed the generator method