make all generation templates and functionality, now need to test and fix