Changed type to Generator