working on template building