figuring out how templates work