made some changes in the generator code
added demo