changed getGenerator to createGenerator