memory fix
generators to save memory