added all of what works so far of template