first version of generator