working on generator
Templates working now