optimised generator